import Vue from 'vue'
import VueI18n from 'vue-i18n'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import customZH from './zh'
import customEN from './en'
Vue.use(VueI18n)
export default new VueI18n({
  locale: localStorage.getItem('language') || 'zh',
  messages: {
    zh: {
      morning: '早上好',
      goodday: '祝你开心每一天',
      confirmDel: '是否确认删除?',
      ...zhLocale,
      ...customZH
    },
    en: {
      morning: 'Good Morning',
      goodday: 'Have a nice day',
      confirmDel: 'Are you sure?',
      ...enLocale,
      ...customEN
    }
  }
})
